//q7.cpp
//This program takes a number of steps in a ladder and print the possible options to climb it.
//
//Binyamin 11 Jan 2018
//===========================================================================================

#include <iostream>

using namespace std;

//num_ways
//input: number of steps
//output: ways to climb it.
int num_ways(int n)
{
	if(n<=3) return n;
	return num_ways(n-2) + num_ways(n-1);
}
//1. Prompt the user for the number of steps.
//2. Capture the number of steps.
//3. print the number of ways
int main()
{
	int num; //user input
	cout << "Please enter the number of steps for the ladder" << endl;
	cin >> num;
	cout << "There are " <<  num_ways(5) << " possibilities to climb the ladder" <<  endl;
	return 0;
}
//output
//Please enter the number of steps for the ladder
//5
//There are 8possibilities to climb the ladder
